#pragma once
#include <QtWebKit/QWebView>
class MainWindow;

class WebBrowser : public QWebView
{
	Q_OBJECT
public slots:
	void slot_trBrowserLoaded(bool);
	void slot_translateFinished();
	void slot_linkHovered ( const QString & link, const QString & title, const QString & textContent );
public:
	int m_tid;
	bool m_original;
	MainWindow *m_mainWindow;
	WebBrowser *m_trBrowser;

	WebBrowser(MainWindow* mainWindow, QWidget* parent = 0);
	WebBrowser() : m_mainWindow(NULL), m_trBrowser(NULL) {}
	virtual ~WebBrowser(void);

	QWebView *createWindow(QWebPage::WebWindowType);
	void loadAndTranslate(const QUrl &url);

};

